package com.evry.sandox.batch.domain.products;

import java.util.List;

import org.springframework.batch.item.ItemWriter;

public class ProductItemWriter implements ItemWriter<Product>{

	public void write(List<? extends Product> items) throws Exception {
		System.out.println("Thread #" + Thread.currentThread().getId() + " - before chunk.");
		for (Product product : items) {
			System.out.println(product.toString());
		}
		System.out.println("Thread #" + Thread.currentThread().getId() + " - after chunk.");
	}

}
